package com.yun.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yun.blog.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    int updateLastLoginTimeByUserId(@Param("userId") Integer userId);

    User getOneByUserUsernameAndUserPassword(@Param("userUsername") String userUsername, @Param("userPassword") String userPassword);

    User getBaseInfoByUserId(@Param("userId") Integer userId);

    <P extends IPage<User>> P customPage(P page, String searchText);

    User getByUserUsername(@Param("userUsername") String userUsername);
}
